package com.company;

import java.util.Scanner;

/**
 * @author zhangjian
 * @data 2023/3/18
 * @Version 1.0
 * @Descripion
 */
public class HJ69矩阵乘法 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        int y = input.nextInt();
        int z = input.nextInt();
        int[][] firstArray = new int[x][y];
        int[][] secondArray = new int[y][z];
        // 第一个矩阵
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < y; j++) {
                firstArray[i][j] = input.nextInt();
            }
        }
        // 第二个矩阵
        for (int i = 0; i < y; i++) {
            for (int j = 0; j < z; j++) {
                secondArray[i][j] = input.nextInt();
            }
        }
        int[][] res = mul(firstArray, secondArray);
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < z; j++) {
                System.out.print(res[i][j] + " ");
            }
            System.out.println();
        }
    }

    public static int[][] mul(int[][] firstArray, int[][] secondArray) {
        int x = firstArray.length;
        int y = secondArray.length;
        int z = secondArray[0].length;
        int[][] res = new int[x][z];
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < z; j++) {
                for (int k = 0; k < y; k++) {
                    res[i][j] += firstArray[i][k] * secondArray[k][j];
                }
            }
        }
        return res;
    }
}
